package com.nervenets.web.controller.handler.admin.setting;

import com.nervenets.web.controller.handler.Handler;
import com.nervenets.web.controller.handler.common.IdTokenParams;
import com.nervenets.web.entity.MessageCode;
import com.nervenets.web.hibernate.domain.setting.Help;

import javax.servlet.http.HttpServletRequest;

public class HelpDetailHandler extends Handler<IdTokenParams> {
    @Override
    public String handle(IdTokenParams params, HttpServletRequest request) throws Exception {
        Help help = userDao.findById(params.getTargetId(), Help.class);
        if (null == help) return errorMessage(MessageCode.code_444, "您查看的帮助文档不存在或已删除！");

        return successMessage(help);
    }

    @Override
    public String result() throws Exception {
        return null;
    }
}
